Skip to content

Update export for new planes to make boilerplates work - #1699

Merged
pyramation merged 2 commits into
mainfrom
update/export-for-new-planes
Aug 12, 2026
Merged

Update export for new planes to make boilerplates work#1699
pyramation merged 2 commits into
mainfrom
update/export-for-new-planes

Conversation

@NorOldBurden

@NorOldBurden NorOldBurden commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

What

Fix tenant export (both SQL and GraphQL flows) to include the routing binding plane and the catalog plane, so a redeployed tenant DB can resolve its own subdomains (login was 404-ing).

Why

resolve_route() (routing 6.1.0) reads hostname_bindings/route_bindings/catalog_private.apis. The export produced none of them:
bindings: tables carry no database_id column (ownership flows via domain_id → routing_public.domains), so neither the flat {databaseId} filter nor WHERE database_id = $1 can scope them — the tables weren't exported at all
catalog_private.apis: dot-qualified keys are skipped in the GraphQL flow (bare-name collisions in the meta build), and the catalog_sync trigger doesn't fire during replica-mode migration replay — so the rows must be derived at export time (this also covers sources whose catalog table is empty because they were themselves built from a replay)

Changes

pgpm/export: manifest keys + updated_at exclusions for hostname_bindings/route_bindings; new TableConfig.filterViaDomainIds; SQL flow scopes bindings via a routing_public.domains subquery, GraphQL flow via a one-time domain-id pre-fetch + in:` filter support inGraphQLClient> -pgpm/export: newcatalog-projection.tsderivescatalog_private.apisfrom the exportedapisrows (mirrorscatalog_private.tg_apis_catalog_sync1:1); run by both flows so their output stays byte-identical
pgpm/export: drop the catalog_private.functions manifest key — unaddressable via the meta API in a mixed build, and this also removes the last SQL/GraphQL output divergence (plus its now-dead columnDefaults entry)

Tests

E2E export-flow snapshot updated: second-workspace deploy now includes migrate/catalog_private.apis.sql

@blacksmith-sh

This comment has been minimized.

@pyramation
pyramation merged commit 9f78b26 into main Aug 12, 2026
20 checks passed
@pyramation
pyramation deleted the update/export-for-new-planes branch August 12, 2026 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants